#include<bits/stdc++.h>
using namespace std;
int n,a[100005],vis[100005]={0},ans;
int half_find(int x){
    int l=0,r=n+1;
    while(l<r){
        int mid=(l+r)/2;
        if(a[mid]<=x){
            l=mid+1;
        }
        else{
            r=mid;
        }
    }
    while(vis[l]==1&&l<=n){
        l++;
    }
    if(l<=n+1&&a[l]>x){
        return l;
    }
    else{
        return -1;
    }
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    ans=n;
    for(int i=1;i<=n;i++){
        int temp=half_find(a[i]);
        if(temp==-1){
            cout<<ans<<endl;
            return 0;
        }
        else{
            ans--;
            vis[temp]=1;
            i--;
        }
    }
    cout<<ans<<endl;
    return 0;
}
